import java.util.Arrays;

public class ArraysDemo04 {
    public static void main(String[] args) {
        int[] nums = {1, 2, 8, 10, 20, 34};

//        int result = Arrays.binarySearch(nums, 20);
//        System.out.println(result);

//        int[] ints = Arrays.copyOf(nums, 6);
//        System.out.println(Arrays.toString(ints));

//        int[] ints = Arrays.copyOfRange(nums, 2, 4);// 区间拷贝
//        System.out.println(Arrays.toString(ints));

//        int[] a = {1, 2};
//        int[] b = {1, 2};
//        System.out.println(a == b);//false ==  用判断引用的
//        System.out.println(Arrays.equals(a,b));//true 判断值的

//        int[] a = new int[10];
//        Arrays.fill(a, 10);//填充
//        System.out.println(Arrays.toString(a));

//        int[] a = {2, 8, 1, 0};
//        Arrays.sort(a);// 排序
//        System.out.println(Arrays.toString(a));
    }
}
